<?php
session_start();
include("config.php");
$bus = $_POST['bus'];
$alert = $_POST['type'];
$offset_time = $_POST['offset'];
$stop_id = $_POST['stop_id'];


/*$tripInfo = explode(',',$stop_name);
array($tripInfo);

$stop_id = $tripInfo[0];
$time = $tripInfo[1];*/ 
//echo "<br>".$time . ",,".$stop_id;
$alert_name = $_POST['alert_name'];
$user_id= $_SESSION['userdata']['user_id'];
// save everything into alert table
Alerts::addAlert($alert,$offset_time,$stop_id,$user_id,$alert_name);

header('Location:saved_alerts.php');
 
?>